const urlPre = '/record';
const columns = [
    {field: 'ck', checkbox: true},
    {field: 'id', title: '序号', sortable: true, align: 'center'},
    {field: 'goodsName', title: '货物名称', align: 'center'},
    {
        field: 'type', title: '类型', align: 'center', formatter: function (value, row, index) {
            return value == 1 ? '出库' : '入库';
        }
    },
    {field: 'sum', title: '数量', align: 'center'},
    {field: 'userName', title: '用户名称', align: 'center'},
    {field: 'createTime', title: '创建时间', align: 'center', sortable: true}
];

$(document).ready(function () {
    $().ready(function () {
        initUserSelect();
        initGoodsSelect();
    })
})

function changeVal(checked, preId) {
    $(preId + 'Button').text($(checked).text());
    $(preId + 'Val').val($(checked).attr('data-attribute'));
}
